import config from "@/config"
import http from "@/utils/request"

export default {
    district: {
        list: {
            url: `${config.API_URL}/develop/district/list`,
            name: "地区列表",
            get: async function(params={}){
                return await http.get(this.url, params);
            }
        },
        edit: {
            url: `${config.API_URL}/develop/district/edit`,
            name: "编辑地区信息",
            post: async function(data={}){
                return await http.post(this.url, data);
            }
        },
        status: {
            url: `${config.API_URL}/develop/district/status`,
            name: "修改地区状态",
            post: async function(data={}){
                return await http.post(this.url, data);
            }
        },
        option: {
            url: `${config.API_URL}/develop/district/option`,
            name: "地区选项",
            get: async function(params={}){
                return await http.get(this.url, params);
            }
        },
        import: {
            url: `${config.API_URL}/develop/district/import`,
            name: "地区导入",
            post: async function(data={}){
                return await http.post(this.url, data);
            }
        },
    },
    map: {
        list: {
            url: `${config.API_URL}/develop/map/list`,
            name: "应用图库列表",
            get: async function(params={}){
                return await http.get(this.url, params);
            }
        },
        edit: {
            url: `${config.API_URL}/develop/map/edit`,
            name: "编辑应用图库信息",
            post: async function(data={}){
                return await http.post(this.url, data);
            }
        },
        status: {
            url: `${config.API_URL}/develop/map/status`,
            name: "修改应用图库状态",
            post: async function(data={}){
                return await http.post(this.url, data);
            }
        },
        delete: {
            url: `${config.API_URL}/develop/map/delete`,
            name: "删除应用图库",
            post: async function(data={}){
                return await http.post(this.url, data);
            }
        },
    },
    center: {
        list: {
            url: `${config.API_URL}/develop/center/list`,
            name: "应用中心列表",
            get: async function(params={}){
                return await http.get(this.url, params);
            }
        },
        edit: {
            url: `${config.API_URL}/develop/center/edit`,
            name: "编辑应用中心信息",
            post: async function(data={}){
                return await http.post(this.url, data);
            }
        },
        status: {
            url: `${config.API_URL}/develop/center/status`,
            name: "修改应用中心状态",
            post: async function(data={}){
                return await http.post(this.url, data);
            }
        },
        delete: {
            url: `${config.API_URL}/develop/center/delete`,
            name: "删除应用中心",
            post: async function(data={}){
                return await http.post(this.url, data);
            }
        },
    },
}
